<template>
  <div id="app" class="fillcontain">
    <router-view/>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  computed: {
    ...mapState(["allowBack"])
  },
  mounted() {
    window.onpopstate = () => {
      if (!this.allowBack) {
        //    这个allowBack 是存在vuex里面的变量
        history.go(1);
      }
    };
  }
};
</script>

<style lang="less">
@import "../../assets/styles/common";
html,
body,
#app {
  height: 100%;
}
</style>
